<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/WEB-INF/includes/template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">
    <f:event type="preRenderView" listener="#{infoBacking.fillForm()}" />
    <ui:define name="title">
	个人信息-- OfficeBoost System
    </ui:define>

    <ui:define name="metadata">
	<f:metadata>
	    <f:event type="preRenderView" listener="#{infoBacking.fillForm}"/>
	</f:metadata>
    </ui:define>

    <ui:define name="content">
        <h:form>
            <h:panelGrid columns="2" >
                <h:outputText value="姓名"/>
                <h:outputText value="#{infoBacking.username}"/>
                <h:outputText value="学号"/>
                <h:outputText value="#{infoBacking.ID}"/>
                <h:outputText value="性别" id="gender"/>
                <h:selectOneRadio value="#{infoBacking.gender}">
                    <f:selectItem itemLabel="男" itemValue="male"/>
                    <f:selectItem itemLabel="女" itemValue="female"/>
                </h:selectOneRadio>
                <h:outputText value="年级"/>
                <h:selectOneMenu id="grade" value="#{infoBacking.grade}">
                    <f:selectItem itemLabel="2009" itemValue="2009"/>
                    <f:selectItem itemLabel="2010" itemValue="2010"/>
                    <f:selectItem itemLabel="2011" itemValue="2011"/>
                    <f:selectItem itemLabel="2012" itemValue="2012"/>
                    <f:selectItem itemLabel="2013" itemValue="2013"/>
                </h:selectOneMenu>
                <h:outputText value="联系电话" />
                <h:inputText value="#{infoBacking.phone}" size="15" />
                <h:outputText value="Email"/>
                <h:inputText value="#{infoBacking.email}" size="15" />
                <h:outputText value="备注"/>
                <h:inputTextarea value="#{infoBacking.other}" cols="14" rows="2"/>
                <h:commandButton value="保存" action="#{infoBacking.saveInfo}" 
                                 onclick="if(!confirm('Are you sure you want save infos?')) return false"/>
            </h:panelGrid>
        </h:form>

    </ui:define>



</ui:composition>
